/*--------------------------------------------------------------------------------------*\
**
** t_adventure_event_base.h
**
** Heroes IV
** Copyright 2000, The 3DO Company
**
\*--------------------------------------------------------------------------------------*/

#if !defined( ADVENTURE_EVENT_REMOVE_H_INCLUDED)
#define ADVENTURE_EVENT_REMOVE_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <list>

#include "adventure_events_base.h"
#include "adventure_object_global_id.h"
#include "map_point.h"
#include "memory_buffer.h"
#include "counted_ptr.h"

// --------------------------------------------------------------------------
// t_adventure_event_remove class : this events captures remove adv_objects events for the given map.
// --------------------------------------------------------------------------

class  t_adventure_object;

class t_adventure_event_remove : public t_adventure_event_base
{
public:
	// Constructor
	t_adventure_event_remove();
	t_adventure_event_remove( t_adventure_object* adv_object, t_level_map_point_2d point );
	t_adventure_event_remove( t_adventure_object* adv_object, t_level_map_point_2d point , t_memory_buffer_counted_ptr adv_buffer_pre_update);
	
	virtual void execute_event( t_adventure_map* map , t_saved_game_header const & header ) ;
	virtual void undo_event( t_adventure_map* map , t_saved_game_header const & header );

	virtual bool	read( std::streambuf & buffer , int version );
	virtual bool	write( std::streambuf & buffer );

protected:

	t_memory_buffer_counted_ptr		m_event_buffer;
	t_memory_buffer_counted_ptr		m_event_state_buffer;
	t_level_map_point_2d			m_event_point;
	bool							m_has_state_buffer;
};

#endif // ADVENTURE_EVENT_REMOVE_H_INCLUDED

